package cn.itcast.user.service.impl;

import cn.itcast.hmall.pojo.user.Address;

import cn.itcast.user.mapper.AddressMapper;
import cn.itcast.user.mapper.UserMapper;
import cn.itcast.user.service.AddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<Address> seleceByUid(String uid) {
        List<Address> list = this.addressMapper.selectByUid(uid);
        return list;
    }

    @Override
    public Address selById(String addressId) {
        return addressMapper.selectById(addressId);
    }
}
